﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeBehind="JT_SubAreaAdd.aspx.cs" Inherits="JTicket.UI.JT_SubAreaAdd" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script type="text/javascript">
    
    //添加
    function Add() {
        if ($('#txtAreaCode').val() == "") {
            alert("请输入分区编号"); $("#txtAreaCode").focus(); return false;
        }
        if ($('#txtAreaName').val() == "") {
            alert("请输入分区名称"); $("#txtAreaName").focus(); return false;
        }
        JTicket.UI.Service.JT_SubAreaSvc.Add($('#txtAreaCode').val(),
        $('#txtAreaName').val(),thCode,"",
        function Success(Result) {
            alert(Result);
            window.location.reload();
        }, isAlertError);
    }
    //删除
    function IsDels(Ids) {
        if (isdel()) {
            JTicket.UI.Service.JT_SubAreaSvc.Delete(Ids,
                function Succes(Result) { alert(Result); window.location.reload(); },
                isAlertError);
        }
    }

</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<asp:ScriptManager ID="sm" runat="server">
        <Services>
            <asp:ServiceReference InlineScript="true" Path="~/Service/JT_SubAreaSvc.asmx" />
        </Services>
    </asp:ScriptManager>
   <table align="center" border="0" cellpadding="4" cellspacing="1" class="toptable grid"
        width="100%">
        <tr>
            <td class="category t2" height="25" width="100">
                座位图信息
            </td>
            <td class="category" height="25">
                分区编号：<input id="txtAreaCode" type="text" style="width: 150px;" />分区名称：<input id="txtAreaName" type="text" style="width: 150px;" /><input type="button" id="BtnAdd" value="新  建" onclick="Add();" onmousemove="showBtnOver(this)"
                    onmouseout="showBtnOut(this)" class="submitMiniGreen" />
 <input type="button" value="返回" onmousemove="showBtnOver(this)"  onmouseout="showBtnOut(this)" class="submitMiniGreen"  onclick="history.go(-1);" /></td>
        </tr>
    </table>
    <table cellpadding="1" cellspacing="1" id="TbInfo" class="TbInfo">
        <tr>
             
            <td class="B" style="width: 10%">
                分区编号
            </td>
            <td class="B"  >
                分区名称
            </td>
            <td class="B" style="width: 20%">
                所属场馆
            </td>
            <td class="B" style="width: 10%">
                分区编辑
            </td>
            <td class="B" style="width: 10%">
                分区座位图编辑
            </td>
            <td class="B" style="width: 10%">
                删除
            </td>
        </tr>
      <%if (_SubArea.Count > 0)
        {%>
        <%foreach (var code in _SubArea)
          {%>
        <tr>
             
            <td class="td1">
             <%=code.AreaCode%>
            </td>
            <td class="td1">
             <%=code.AreaName%>
            </td>
            <td class="td1">
             <%=code.ThName%>
            </td>
            <td class="td2">
                <img src="Images/icon_edit.gif" alt="分区编辑" style="cursor: hand" onclick="isEdite('JT_EditeSubArea.aspx?Flag=Edite&IDs=<%=code.AreaCode%>&redirct=JT_SubAreaAdd.aspx?ID=<%=code.ThCode%>&ThName=<%=code.ThName%>')" />
            </td>
            <td class="td2">
                <img src="Images/bullet2.gif" alt="分区座位图编辑" style="cursor: hand" onclick="isEdite('JT_DrawSubArea.aspx?Flag=Edite&ID=<%=code.AreaCode%>&ThCode=<%=code.ThCode%>')" />
            </td>
            <td class="td2">
             <img src="Images/no.gif" alt="删除" style="cursor: hand"  onclick="javascript:IsDels('<%=code.AreaCode%>');"/>
            </td>
        </tr>
       <%}%>
       <%}%>
    </table>
    <div id="pager" class="pagination" style="background: #FFFFFF">
    </div> 
</asp:Content>
